home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 1.iso / games / fibsw130.zip / DIAL.SCR < prev    next >
Text File  |  1994-05-31  |  2KB  |  58 lines

  1. @echo 0
  2. @rem ****************************************************************************
  3. @rem ****                                                                   *****
  4. @rem ****   dial.scr - Dials the telephone number on Hayes(tm)-compatible   *****
  5. @rem ****              Modems.                                              *****
  6. @rem ****                                                                   *****
  7. @rem ****************************************************************************
  8.  
  9. @if "%DialStringPrefix%" == ""
  10. @  echo "\aDIAL.SCR: Error:  Dial String Prefix not set. See the Options/Modem Settings... menu command for details.\r\n"
  11. <
  12. @endif
  13.  
  14. @if "%TelephoneNumber%" == ""
  15. @   echo "\a** DIAL.SCR: Error:  Telephone Number not set. See the Options/Script Settings... menu command for details.\r\n"
  16. <
  17. @endif
  18.  
  19.  
  20. @echo "** Initializing the Modem...\r\n"
  21.  
  22. @send "ATZ\r"
  23. @if not @wait "OK" 3
  24. @  rem It's OK, modem may be set to V0.
  25. @endif
  26.  
  27. @if "%ModemInitString%" != ""
  28. @  send "%ModemInitString%\r"
  29. @  if not @wait "OK" 10
  30. @      echo "\r\n** DIAL.SCR: Error:  Modem not responding\r\n"
  31. <  
  32. @  endif
  33. @endif
  34.  
  35. @echo "\r\n** Dialing %TelephoneNumber%...\r\n"
  36.  
  37. @:Redial
  38. @    send "%DialStringPrefix%%TelephoneNumber%\r\n"
  39. @    if not @branch "Waiting for CONNECT" 60 "CONNECT" Connect "BUSY" Busy "NO CARRIER" NoCarrier
  40. @:NoCarrier
  41. @:Busy
  42. @       send "\r"
  43. @       echo "\r\n** No answer.\r\n"
  44. @       wait 5
  45. @       echo "** Redialing %TelephoneNumber%...\r\n"
  46. @       goto Redial
  47. @    endif 
  48. @:Connect
  49.  
  50. @wait "\n" ; Wait for the end of line
  51. @echo "\r\n** Connected\r\n"
  52.  
  53. @if "%NetworkScript%" != ""
  54. @echo "** Establishing Network Connection...\r\n"
  55. @"<%NetworkScript%"
  56. @endif
  57.  
  58.